<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户注册</title>
</head>
<body>
<div>
    <%
        //定义访问次数
        //定义访问次数
        Integer count  = (Integer) application.getAttribute("count");

        //第一次获取时，没有向application容器加count变量，此时count为空
        //第二次获取时，向application容器加count变量，此时count不为空
        if (count == null){

            count = 1;//初始化count

        }else {
            count++;//获取每次登录时的访问次数
        }
        application.setAttribute("count",count);//向application容器加入count访问次数的变量
    %>
    <%

        Integer i = (Integer) application.getAttribute("count");
        out.print("本站访问人数为："+i);
    %>
</div>
<form action="MessageTest1Servlet" method="post" class="form-horizontal">
    <div>
        <ul style="list-style-type: none">
            <li>
                <p style="margin-left: 120px">用户信息</p>
            </li>

            <li>
                <span style="padding-right: 16px">用户名：</span>
                <input type="text" name="username">
            </li>

            <li>
                <span style="padding-right: 32px">密码：</span>
                <input type="password" name="userpsw">
            </li>

            <li>
                <span style="padding-right: 32px">性别：</span>
                <select name="usersex">
                    <option value="female">女</option>
                    <option value="male">男</option>
                </select>
            </li>

            <li>
                <span>个性签名：</span><br>
                <textarea name="usersign" style="width: 226px;height: 200px;float: left;margin-left: 26px">
                </textarea>
            </li>

            <input type="hidden" id="userother" name="userother" value="moniter">
            <%--            type=hidden，隐藏域，页面不显示，但提交数据的时候，会提交数据--%>


            <li style="margin-top: 200px">
                <button type="submit" name="button" class="red_button" style="float:left;">确认</button>
                <button type="button" name="button" style="float: left;margin-left: 164px">取消</button>
            </li>
        </ul>
    </div>
</form>
</body>
</html>
